package com.threads;


import java.util.Map;

class UnresponsiveUI{
    private volatile double d=1;

    public UnresponsiveUI() throws Exception{
        while (d>0){
            d=d+(Math.PI+ Math.E)/d;
        }
        System.in.read();
    }
}
/**
 * @author 13699
 */
public class ResponsiveUi extends Thread{
    private static volatile double d=1;
    public ResponsiveUi(){
        setDaemon(true);
        start();
    }

    @Override
    public void run() {
        while (true){
            d=d+(Math.PI+Math.E)/d;
        }
    }

    public static void main(String[] args)throws Exception {
        new ResponsiveUi();
        System.in.read();
        System.out.println(d);
    }
}
